<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value='角色'}}
{{assign var="app" value='role'}}
{{assign var="act" value='index'}}
{{assign var="table" value='role'}}
{{assign var="td" value='6'}}
<title>{{$title}}管理 - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
</head>
<body>

{{include file="include/sidebar.html"}}

<div class="body_right">
	<div id="content">
	
	<div class="search">
	<form action="index.php?app={{$app}}" method="get" name="search" class="router">
		<input type="hidden" name="app" value="{{$app}}"/>
		  <ul class="bread">
			<li>
				角色名称：<input class="input-small" type="text" name="name" value="{{$smarty.get.name}}" />
			</li>
			<li>
				创建日期：<input type="text" class="Wdate input-small" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="create_time" value="{{$smarty.get.create_time}}"/>
			</li>
			<li>
				<button type="submit" class="search btn btn-success"><i class="icon-search"></i>搜索</button>
				<a href="index.php?app={{$app}}" class="a">清除</a>
			</li>
		  <ul>
	</form>
	</div>

	<form action="index.php?app={{$app}}" method="post" name="form">
	<input type="hidden" name="act" value=""/>
	<table class="table table-bordered">
		<tr class="thead">
		  <td colspan="{{$td}}">
		  <div class="floatr">
			<a class="btn iframe" href="index.php?app={{$app}}&act=modify&url={{$smarty.const.URL|encode}}&iframe=true" title="添加{{$title}}"><i class="icon-plus"></i>添加{{$title}}</a>
			<a class="btn mydelete btn-danger" href="javascript:"><i class="icon-trash icon-white"></i>批量删除</a>
		  </div>
		  ◆ {{$title}}管理 －> {{$title}}列表
		  </td>
		</tr>
		{{if !$roles}}
		<tr class="noline"><td colspan="{{$td}}" class="result_empty"></td></tr>
		{{else}}
		<tr class="ttitle">
			<th width="22"><label><input class="check_all" type="checkbox"/></label></th>
			<th>ID</th>
			<th>名称</th>
			<th>创建时间</th>
			<th>状态</th>
			<th width="160">操作</th>
		</tr>

		<tbody>
			{{foreach from=$roles item=val}}
			<tr>
				<td width="4%"><label><input name="check_id[]" class="check_id" value="{{$val.id}}" type="checkbox"/></label></td>
				<td>{{$val.id}}</td>
				<td>{{$val.name}}</td>
				<td>{{$val.create_time}}</td>
				{{*状态*}}<td> {{if $val.id==1}}/{{else}}<a class="ajaxSubmit refresh" link="index.php?app=functions&act=setValue&value={{!$val.publish}}&params={{'table='|cat:$table|cat:'&field=publish&id='|cat:$val.id|encode}}"><span class="select_{{$val.publish}}"></span></a>{{/if}} </td>
				<td>
					{{if $val.id==1}}/{{else}}<a class="btn iframe" title="编辑角色" href="index.php?app={{$app}}&act=modify&id={{$val.id}}&url={{$smarty.const.URL|encode}}&iframe=true"><i class="icon-edit"></i>编辑</a>{{/if}}
				</td>
			</tr>
		    {{/foreach}}
			<tr class="noline ttitle">
			  <td colspan="{{$td}}">
				<a class="check_all btn"><i class="icon-ok"></i>全选/反选</a>
				<!--a href="javascript:" class="coolbg">保存排序</a-->
			  </td>
			</tr>
			<tr class="thead">
			  <td colspan="{{$td}}">
				{{include file="include/page.html"}}
			  </td>
			</tr>
		</tbody>
		{{/if}}
	</table>
	</form>

</div>
</div>

</body>
</html>